package com.xbongbong.pro.service.dingtalk;

import com.xbongbong.pro.enums.workrecord.enums.WorkrecordResultEnum;
import com.xbongbong.pro.process.pojo.dto.WorkrecordInstanceDTO;
import com.xbongbong.pro.process.pojo.dto.WorkrecordTaskDTO;
import com.xbongbong.pro.process.pojo.dto.WorkrecordUpdateTaskDTO;

import java.util.List;

/**
 * 钉钉OA待办服务
 *
 * @author LiZhikang
 * @date 2023/3/14 17:09
 */
public interface WorkflowDingtalkService {
    /**
     * 获取OA模板代码
     *
     * @param corpid
     * @return
     */
    String getDingtalkProcessCode(String corpid);

    /**
     * 创建钉钉OA实例
     *
     * @param workrecordInstanceDTO
     */
    void createDingtalkInstance(WorkrecordInstanceDTO workrecordInstanceDTO);

    /**
     * 更新钉钉OA实例
     *
     * @param corpid
     * @param processInstanceId
     * @param workrecordResultEnum
     */
    void updateDingtalkInstance(String corpid, String processInstanceId, WorkrecordResultEnum workrecordResultEnum);

    /**
     * 批量更新OA钉钉实例
     *
     * @param corpid
     * @param processInstanceIds
     * @param workrecordResultEnum
     */
    void batchUpdateDingtalkInstance(String corpid, List<String> processInstanceIds, WorkrecordResultEnum workrecordResultEnum);

    /**
     * 创建钉钉待办任务
     *
     * @param workrecordTaskDTO
     */
    void createDingtalkTask(WorkrecordTaskDTO workrecordTaskDTO);

    /**
     * 更新钉钉待办任务
     *
     * @param workrecordUpdateTaskDTO
     * @param workrecordResultEnum
     */
    void updateDingtalkTask(WorkrecordUpdateTaskDTO workrecordUpdateTaskDTO, WorkrecordResultEnum workrecordResultEnum);

    /**
     * 批量取消钉钉待办任务
     *
     * @param workrecordUpdateTaskDTO
     */
    void batchCancelDingtalkTask(WorkrecordUpdateTaskDTO workrecordUpdateTaskDTO);
}
